package models

import (
	"gitee.com/dromara/carbon/v2"
	"github.com/shopspring/decimal"
)

// OrderDiscount 订单优惠
type OrderDiscount struct {
	ID        int64           `json:"id" gorm:"id"`
	OrderId   int64           `json:"order_id" gorm:"order_id"`
	UserId    int64           `json:"user_id" gorm:"user_id"`
	MemberId  int64           `json:"member_id" gorm:"member_id"`
	Discount  decimal.Decimal `json:"discount" gorm:"discount"`
	CreatedAt carbon.Carbon   `json:"created_at" gorm:"created_at"`
	UpdatedAt carbon.Carbon   `json:"updated_at" gorm:"updated_at"`
}

// TableName 表名称
func (*OrderDiscount) TableName() string {
	return "order_discount"
}
